import React from 'react'

type Props = {}

const App = (props: Props) => {
  const arr:Array<number>=[2,1,4,3]
arr.sort((a,b)=>{
   return b-a
})
const arr2=(arr:number[])=>{
  const fu= new Set(arr)
  console.log(fu);
  let sum:number=0
  fu.forEach((v)=>{
   sum+=v
  })
  console.log(sum);
  
 }
 console.log(arr2([1,1,1,2,2,2,3]));
console.log(arr,arr[arr.length-1]);
  return (
    <div>App</div>
  )
}

export default App